#pragma once


#include "AESKey.h"
#include "AESUserDefs.h"
#include "KeyManifest.h"
#include "AESEngine.h"

#include "IAESKey.h"
#include "IAESEngine.h"
/***
 *	Factory method manufactures a new Key Alias Object! 
 */
static IAESKey* newKey(KeyManifest	*kMan, const char* keyLabel)
{
	IAESKey* aesKey = new AESKey(kMan, keyLabel);

	if (!aesKey){
		perror ("newKey reports no memory error");

		return NULL;
	}

	return aesKey;
}

static IKeyManifest* newManifest(void)
{
	IKeyManifest* manifest = new KeyManifest;

	if (!manifest){
		perror ("newKey reports no memory error");

		return NULL;
	}

	return manifest;
}

static IAESEngine* newAESEngine(void)
{
	IAESEngine* engine = new AESEngine;

	if (!engine){
		perror ("newAESEngine reports no memory error");

		return NULL;
	}

	return engine;
}